<div ng-controller="FirmasCuentaBancariaController">
    <fieldset>
        <legend>Titulares de Cuenta Bancaria</legend>
        <div class="panel panel-default">
            <div class="panel-body">
                <table>
                    <tr>
                        <td colspan="1" style="width: 110px;"><strong>Documento:</strong></td>
                        <td colspan="1" style="width: 200px;">
                            <span ng-show="socio.personaNatural" ng-bind-template="{{socio.personaNatural.tipoDocumento.abreviatura}}/{{socio.personaNatural.numeroDocumento}}"></span>
                            <span ng-show="socio.personaJuridica" ng-bind-template="{{socio.personaJuridica.tipoDocumento.abreviatura}}/{{socio.personaJuridica.numeroDocumento}}"></span>
                        </td>
                        <td colspan="1"><strong>Socio:</strong></td>
                        <td colspan="1">
                            <span ng-show="socio.personaNatural" ng-bind-template="{{socio.personaNatural.apellidoPaterno}} {{socio.personaNatural.apellidoMaterno}}, {{socio.personaNatural.nombres}}"></span>
                            <span ng-show="socio.personaJuridica" ng-bind="socio.personaJuridica.razonSocial"></span>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="1"><strong>Tipo Cuenta:</strong></td>
                        <td colspan="1"><span ng-bind="cuentaBancaria.tipoCuentaBancaria"></span></td>
                        <td colspan="1" style="width: 140px"><strong>N&uacute;mero Cuenta:</strong></td>
                        <td colspan="1"><span ng-bind="cuentaBancaria.numeroCuenta"></span></td>
                    </tr>
                    <tr>
                        <td colspan="1"><strong>Moneda:</strong></td>
                        <td colspan="1">
                        	<span ng-bind="cuentaBancaria.moneda.denominacion"></span>
                        	<span>(</span>
                        	<span ng-bind="cuentaBancaria.moneda.simbolo"></span>
                        	<span>)</span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="row" ng-repeat = "titularY in titulares">
            <div class="col-sm-6 col-md-4" ng-repeat="titularX in titularY">
                <div>
                    <div class="thumbnail"
                         ng-controller="LoadImageController"
                         flow-init="configImagen(titularX.personaNatural.id,'firma')"
                         flow-files-submitted="$flow.upload()"
                         flow-file-success="$file.msg = $message"
                         flow-name="flowObject"
                         flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]">

                        <div ng-show="!$flow.files.length">
                            <img ng-src="{{getImagen(titularX.personaNatural.id,'firma')}}" style="width: 100%; height: 150px">
                        </div>
                        <div ng-show="$flow.files.length">
                            <img flow-img="$flow.files[0]" style="width: 100%; height: 150px">
                        </div>
                        <div class="caption">
                            <h4>Titular</h4>
                            <p ng-cloak style="font-size: 12px;">{{titularX.personaNatural.apellidoPaterno}} {{titularX.personaNatural.apellidoMaterno}}, {{titularX.personaNatural.nombres}}</p>
                            <div>
                            <span class="btn btn-success center-block" ng-show="!$flow.files.length" flow-btn>
                                Seleccionar Firma
                                <input type="file" style="visibility: hidden; position: absolute;">
                            </span>
                                <div style="text-align: center;">
                                <span class="btn btn-info" ng-show="$flow.files.length" flow-btn>
                                    Cambiar
                                    <input type="file" style="visibility: hidden; position: absolute;">
                                </span>
                                <span class="btn btn-danger" ng-show="$flow.files.length" ng-click="$flow.cancel()">
                                    Eliminar
                                </span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <button type="button" class="btn btn-primary" ng-click="goToPanelCuenta()">Continuar</button>
        </div>

    </fieldset>
</div>